import java.util.concurrent.*;

class MyThread extends  Thread{
    @Override
    public void run() {

    }
}
public class Test {
    public static void main(String[] args) {
        Thread thread2=new Thread(){
            @Override
            public void run() {

            }
        };
        MyThread myThread1=new MyThread();
        myThread1.run();

        Thread thread=new Thread(new Runnable() {
            @Override
            public void run() {

            }
        });
        Thread thread3=new Thread(()->{

        });

        ExecutorService executorService= Executors.newCachedThreadPool();
        executorService.submit(new Runnable() {
            @Override
            public void run() {
                System.out.println(1);
            }
        });

        Callable<Integer>callable=new Callable<Integer>() {
            @Override
            public Integer call() throws Exception {
                return 1;
            }
        };
        FutureTask<Integer>futureTask=new FutureTask<Integer>(callable);
        Thread thread1=new Thread(futureTask);
        thread1.start();
    }
    public static void main1(String[] args) throws InterruptedException{
        MyTimer myTimer=new MyTimer();

        myTimer.schedule(new Runnable() {
            @Override
            public void run() {
                System.out.println("任务1");
            }
        },1000);
    }
}
